package client.whiteboard.model;

import java.awt.event.MouseEvent;

public class GUIManager implements IGUIManager{
	
	private IDrawing _drawing;
	private ISubmitListener _submitListener;
	private String _username;
	public GUIManager(String username, ISubmitListener submitListener)
	{
		_username = username;
		_submitListener = submitListener;
	}
	public void mouseDown(int px, int py) {
		
		
	}
	public void sliderChanged(int sliderValue)
	{
		_drawing.setPenSize(sliderValue);
	}
	public void setDrawing(IDrawing drawing)
	{
		_drawing = drawing;
	}
	public void mouseDrag(int px, int py) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseMove(int px, int py) {
		// TODO Auto-generated method stub	
	}
	@Override
	public void mouseUp(int px, int py) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void buttonPressed(String value) {
		// TODO Auto-generated method stub
		if(value == "Submit")
		{
			_submitListener.submitWhiteboard(_username, _drawing.getDrawingData());
		}
		if(value == "Clear")
		{
			_drawing.clear();
		}
	}

}
